package com.jcli._java_swing_入门教程pdf.ch17;

import com.jcli.util.GUIUtil;

import javax.swing.*;

/**
 * @author li
 * @version 1.0
 * @belongsProject novel_20230923
 * @belongsPackage com.jcli._java_swing_入门教程pdf.ch17
 * @className _00_JLabelDemo
 * @description TODO  标签案例
 * @createTime 2024-01-24  20:55
 */
public class _00_JLabelDemo {
    public static void main(String[] args) {
        GUIUtil.useLNF();
        JFrame frame = new JFrame("Java标签组件实力");
        JPanel jp = new JPanel();
        JLabel jLabel1 = new JLabel("普通标签");
        JLabel jLabel2 = new JLabel();
        jLabel2.setText("调用setText（）方法");
        ImageIcon img = new ImageIcon("pic/Snipaste_2023-12-25_12-02-52.png");
        JLabel jLabel3 = new JLabel("开始理财",img,JLabel.CENTER);
        jp.add(jLabel1);
        jp.add(jLabel2);
        jp.add(jLabel3);
        frame.add(jp);
        frame.setBounds(300,200,400,100);
        frame.setVisible(true);
        frame.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
    }
}
